package com.csy.user.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.csy.user.entity.ParkSpace;
import com.csy.user.mapper.ParkSpaceMapper;
import com.csy.user.service.IParkSpaceService;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 
 * @since 2025-02-27
 */
@Service
public class ParkSpaceServiceImpl extends ServiceImpl<ParkSpaceMapper, ParkSpace> implements IParkSpaceService {

    @Resource
    ParkSpaceMapper parkSpaceMapper;

    /**
     * 获取停车位
     * @param parkSpace
     * @return
     */
    @Override
    public List<ParkSpace> getSpaces(ParkSpace parkSpace) {

        return parkSpaceMapper.getList(parkSpace);
    }

    /**
     * 统计车位数量
     * @return
     */
    @Override
    public int countParkSpace() {
        return parkSpaceMapper.count();
    }
}
